/*
   Copyright (c) 2023 李伟国
   learner-platform is licensed under Mulan PSL v2.
   You can use this software according to the terms and conditions of the Mulan PSL v2. 
   You may obtain a copy of Mulan PSL v2 at:
               http://license.coscl.org.cn/MulanPSL2 
   THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.  
   See the Mulan PSL v2 for more details. 
*/

package cn.platform.service;

import cn.platform.entity.LearningPlan;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface ILearningPlanService extends IService<LearningPlan> {
    /**
     * 通过用户查找用户的学习计划
     * @param userId 用户id
     * @return 学习计划列表
     */
    List<LearningPlan> findByUserId(Long userId);

    /**
     * 通过用户id删除学习计划
     * @param userId 用户id
     * @return 是否成功
     */
    boolean removeByUserId(Long userId);

    /**
     * 通过用户id列表删除用户信息
     * @param userIds 用户id数组
     * @return 是否删除成功
     */
    boolean removeByUserId(Long... userIds);

    /**
     * 将学习计划标记为已完成
     * @param planIds 学习计划的id
     * @return 是否标记成功
     */
    boolean completed(Long[] planIds);

    /**
     * 将学习计划标记为正常
     * @param planIds 学习计划的id
     * @return 是否标记成功
     */
    boolean enable(Long[] planIds);

}
